package com.hackafone.storytail.service;

import java.util.List;

import org.springframework.web.client.RestTemplate;

import com.hackafone.storytail.model.Tale;

public class StoryTailServices
{
	
	public static TaleList getTales()
	{
		RestTemplate restTemplate = new RestTemplate();
		TaleList tl = restTemplate.getForObject("http://ttatgae.appspot.com/rest/tales", TaleList.class);
		
		return tl;
	}
	
	public class TaleList
	{
		List<Tale> tale;

		public List<Tale> getTale()
		{
			return tale;
		}

		public void setTale(List<Tale> tale)
		{
			this.tale = tale;
		}
		
	}
}
